:root {
  // Primitive Colors
  --ifm-color-black-light: #272b36;
  --ifm-color-black-lighter: #26262f;
  --ifm-color-blue: #28c6e4;
  --ifm-color-white-dark: #f0f0fd;
  --ifm-color-white-darker: #e6e6fd;
  --ifm-color-white-darkest: #c5c5e9;
  --ifm-color-purple: #ae81ff;
  --ifm-color-orange: #fd971f;
  --ifm-color-orange-dark: #f25a00;
  --ifm-color-green: #6aaf19;
  --ifm-color-red: #f92672;
  --ifm-color-yellow: #feec4c;

  // Background
  --ifm-color-background: var(--ifm-color-white);
  --ifm-color-background-2: var(--ifm-color-white-dark);
  --ifm-color-background-3: var(--ifm-color-white-darker);
  --ifm-color-on-background: var(--ifm-color-black);
  --ifm-color-on-background-2: var(--ifm-color-purple-darker);
  --ifm-color-on-background-3: var(--ifm-color-purple-dark);

  // Surface
  --ifm-color-surface: var(--ifm-color-white-darker);
  --ifm-color-surface-transparent: rgba(
    230,
    230,
    253,
    0
  ); /* https://stackoverflow.com/questions/15597167/css3-opacity-gradient */
  --ifm-color-surface-2: var(--ifm-color-white-darkest);
  --ifm-color-on-surface: var(--ifm-color-black);
  --ifm-color-on-surface-2: var(--ifm-color-purple-darkest);
  --ifm-color-on-surface-3: var(--ifm-color-purple-darker);

  // ==============================================================================
  // General Docusaurus
  // ==============================================================================

  /* Colors. */
  --ifm-dark-value: 10%;
  --ifm-darker-value: 15%;
  --ifm-darkest-value: 30%;
  --ifm-light-value: 15%;
  --ifm-lighter-value: 30%;
  --ifm-lightest-value: 50%;

  --ifm-color-primary: var(--ifm-color-red);
  --ifm-color-primary-dark: #f80a60;
  --ifm-color-primary-darker: #ed075a;
  --ifm-color-primary-darkest: #c3054a;
  --ifm-color-primary-light: #fa4284;
  --ifm-color-primary-lighter: #fa508d;
  --ifm-color-primary-lightest: #fb7aa8;

  --ifm-color-secondary: var(--ifm-color-gray-100);
  --ifm-color-secondary-dark: var(--ifm-color-gray-200);
  --ifm-color-secondary-darker: var(--ifm-color-gray-300);
  --ifm-color-secondary-darkest: var(--ifm-color-gray-400);
  --ifm-color-secondary-light: var(--ifm-color-gray-100);
  --ifm-color-secondary-lighter: var(--ifm-color-gray-50);
  --ifm-color-secondary-lightest: var(--ifm-color-gray-50);

  --ifm-color-success: var(--ifm-color-green);
  --ifm-color-success-dark: #5f9e17;
  --ifm-color-success-darker: #5a9515;
  --ifm-color-success-darkest: #4a7b11;
  --ifm-color-success-light: #75c11c;
  --ifm-color-success-lighter: #7ac91d;
  --ifm-color-success-lightest: #8ae024;

  --ifm-color-info: var(--ifm-color-blue);
  --ifm-color-info-dark: rgb(76, 179, 212);
  --ifm-color-info-darker: rgb(71, 169, 201);
  --ifm-color-info-darkest: rgb(59, 139, 165);
  --ifm-color-info-light: rgb(110, 207, 239);
  --ifm-color-info-lighter: rgb(135, 216, 242);
  --ifm-color-info-lightest: rgb(170, 227, 246);

  --ifm-color-warning: #ffba00;
  --ifm-color-warning-dark: rgb(230, 167, 0);
  --ifm-color-warning-darker: rgb(217, 158, 0);
  --ifm-color-warning-darkest: rgb(179, 130, 0);
  --ifm-color-warning-light: rgb(255, 196, 38);
  --ifm-color-warning-lighter: rgb(255, 207, 77);
  --ifm-color-warning-lightest: rgb(255, 221, 128);

  --ifm-color-danger: #fa383e;
  --ifm-color-danger-dark: rgb(225, 50, 56);
  --ifm-color-danger-darker: rgb(213, 48, 53);
  --ifm-color-danger-darkest: rgb(175, 39, 43);
  --ifm-color-danger-light: rgb(251, 86, 91);
  --ifm-color-danger-lighter: rgb(251, 116, 120);
  --ifm-color-danger-lightest: rgb(253, 156, 159);

  --ifm-color-white: #fff;
  --ifm-color-black: #000;

  --ifm-color-gray-0: var(--ifm-color-white);
  --ifm-color-gray-50: #f9fafb;
  --ifm-color-gray-100: #f3f4f6;
  --ifm-color-gray-200: #e5e7eb;
  --ifm-color-gray-300: #d1d5db;
  --ifm-color-gray-400: #9ca3af;
  --ifm-color-gray: #9f9f8f;
  --ifm-color-gray-500: #6b7280;
  --ifm-color-gray-600: #4b5563;
  --ifm-color-gray-700: #374151;
  --ifm-color-gray-800: #1f2937;
  --ifm-color-gray-900: #111827;
  --ifm-color-gray-1000: var(--ifm-color-black);

  --ifm-color-emphasis-0: var(--ifm-color-gray-0);
  --ifm-color-emphasis-100: var(--ifm-color-gray-100);
  --ifm-color-emphasis-200: var(--ifm-color-gray-200);
  --ifm-color-emphasis-300: var(--ifm-color-gray-300);
  --ifm-color-emphasis-400: var(--ifm-color-gray-400);
  --ifm-color-emphasis-500: var(--ifm-color-gray-500);
  --ifm-color-emphasis-600: var(--ifm-color-gray-600);
  --ifm-color-emphasis-700: var(--ifm-color-gray-700);
  --ifm-color-emphasis-800: var(--ifm-color-gray-800);
  --ifm-color-emphasis-900: var(--ifm-color-gray-900);
  --ifm-color-emphasis-1000: var(--ifm-color-gray-1000);

  /* Base. */
  --ifm-color-content: var(--ifm-color-emphasis-900);
  --ifm-color-content-inverse: var(--ifm-color-emphasis-0);
  --ifm-color-content-secondary: #606770;

  --ifm-background-color: transparent; /* Body's background. */
  --ifm-background-surface-color: var(--ifm-color-content-inverse);
  --ifm-global-border-width: 1px;
  --ifm-global-radius: 0.4rem;

  --ifm-hover-overlay: rgba(0, 0, 0, 0.05);

  /* Z-index. */
  --ifm-z-index-dropdown: 100;
  --ifm-z-index-fixed: 200;
  --ifm-z-index-overlay: 400;
  --ifm-container-width: 1140px;
  --ifm-container-width-xl: 1320px;
  --ifm-code-background: var(--ifm-color-emphasis-200);
  --ifm-code-border-radius: var(--ifm-global-radius);
  --ifm-code-color: var(--ifm-color-emphasis-900);
  --ifm-code-font-size: 95%;
  --ifm-code-padding-horizontal: 0.4rem;
  --ifm-code-padding-vertical: 0.2rem;

  --ifm-pre-background: var(--ifm-color-emphasis-100);
  --ifm-pre-border-radius: var(--ifm-code-border-radius);
  --ifm-pre-color: inherit;
  --ifm-pre-line-height: 1.45;
  --ifm-pre-padding: 1rem;
  --ifm-heading-color: inherit;
  --ifm-heading-margin-top: 0;
  --ifm-heading-margin-bottom: var(--ifm-spacing-vertical);
  --ifm-heading-font-family: inherit;
  --ifm-heading-font-weight: var(--ifm-font-weight-bold);
  --ifm-heading-line-height: 1.25;

  --ifm-h1-font-size: 2rem;
  --ifm-h2-font-size: 1.5rem;
  --ifm-h3-font-size: 1.25rem;
  --ifm-h4-font-size: 1rem;
  --ifm-h5-font-size: 0.875rem;
  --ifm-h6-font-size: 0.85rem;
  --ifm-image-alignment-padding: 1.25rem;
  /* Leading is the distance between two baselines */
  /* TODO: add appropriate mobile leading */
  --ifm-leading-desktop: 1.25;
  --ifm-leading: calc(var(--ifm-leading-desktop) * 1rem);
  --ifm-list-left-padding: 2rem;
  --ifm-list-margin: 1rem;
  --ifm-list-item-margin: 0.25rem;
  --ifm-list-paragraph-margin: 1rem;
  --ifm-table-cell-padding: 0.75rem;

  --ifm-table-background: transparent;
  --ifm-table-stripe-background: var(--ifm-color-emphasis-100);

  --ifm-table-border-width: 1px;
  --ifm-table-border-color: var(--ifm-color-emphasis-300);

  --ifm-table-head-background: inherit;
  --ifm-table-head-color: inherit;
  --ifm-table-head-font-weight: var(--ifm-font-weight-bold);

  --ifm-table-cell-color: inherit;
  /* Links. */
  --ifm-link-color: var(--ifm-color-primary);
  --ifm-link-decoration: none;
  --ifm-link-hover-color: var(--ifm-link-color);
  --ifm-link-hover-decoration: underline;

  /* Paragraphs. */
  --ifm-paragraph-margin-bottom: var(--ifm-leading);

  /* Blockquotes. */
  --ifm-blockquote-color: #6a737d;
  --ifm-blockquote-font-size: var(--ifm-font-size-base);
  --ifm-blockquote-padding-horizontal: 1rem;
  --ifm-blockquote-padding-vertical: 1rem;

  /* Horizontal Rules. */
  --ifm-hr-border-color: var(--ifm-color-emphasis-500);
  --ifm-hr-border-width: 1px;
  --ifm-hr-margin-vertical: 1.5rem;
  --ifm-alert-background-color: inherit; /* Set a default which will be overridden later. */
  --ifm-alert-border-color: inherit; /* Set a default which will be overridden later. */
  --ifm-alert-border-radius: var(--ifm-global-radius);
  --ifm-alert-border-width: var(--ifm-global-border-width);
  --ifm-alert-color: var(--ifm-font-color-base-inverse);
  --ifm-alert-padding-horizontal: var(--ifm-spacing-horizontal);
  --ifm-alert-padding-vertical: var(--ifm-spacing-vertical);
  --ifm-avatar-intro-margin: 1rem;
  --ifm-avatar-intro-alignment: inherit;
  --ifm-avatar-photo-size-sm: 2rem;
  --ifm-avatar-photo-size-md: 3rem;
  --ifm-avatar-photo-size-lg: 4rem;
  --ifm-avatar-photo-size-xl: 6rem;
  --ifm-badge-background-color: inherit; /* Set a default which will be overridden later. */
  --ifm-badge-border-color: inherit; /* Set a default which will be overridden later. */
  --ifm-badge-border-radius: var(--ifm-global-radius);
  --ifm-badge-border-width: var(--ifm-global-border-width);
  --ifm-badge-color: var(--ifm-color-white);
  --ifm-badge-padding-horizontal: calc(var(--ifm-spacing-horizontal) * 0.5);
  --ifm-badge-padding-vertical: calc(var(--ifm-spacing-vertical) * 0.25);
  --ifm-breadcrumb-border-radius: 1.5rem;
  --ifm-breadcrumb-spacing: 0.0625rem;
  --ifm-breadcrumb-color-active: var(--ifm-color-primary);
  --ifm-breadcrumb-item-background-active: var(--ifm-hover-overlay);
  --ifm-breadcrumb-padding-horizontal: 1rem;
  --ifm-breadcrumb-padding-vertical: 0.5rem;
  --ifm-breadcrumb-size-multiplier: 1;
  --ifm-breadcrumb-separator: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 256 256"><g><g><polygon points="79.093,0 48.907,30.187 146.72,128 48.907,225.813 79.093,256 207.093,128"/></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>');
  --ifm-breadcrumb-separator-filter: none;
  --ifm-breadcrumb-separator-size: 0.5rem;
  --ifm-breadcrumb-separator-size-multiplier: 1.25;
  --ifm-button-background-color: white;
  --ifm-button-border-color: var(--ifm-button-background-color);
  --ifm-button-border-width: var(--ifm-global-border-width);
  --ifm-button-color: var(--ifm-font-color-base-inverse);
  --ifm-button-font-weight: var(--ifm-font-weight-bold);
  --ifm-button-padding-horizontal: 1.5rem;
  --ifm-button-padding-vertical: 0.375rem;
  --ifm-button-size-multiplier: 1;
  --ifm-button-transition-duration: var(--ifm-transition-fast);
  --ifm-button-border-radius: calc(
    var(--ifm-global-radius) * var(--ifm-button-size-multiplier)
  );
  --ifm-button-group-margin: 2px;
  --ifm-card-background-color: var(--ifm-background-surface-color);
  --ifm-card-border-radius: calc(var(--ifm-global-radius) * 2);
  --ifm-card-horizontal-spacing: var(--ifm-global-spacing);
  --ifm-card-vertical-spacing: var(--ifm-global-spacing);
  --ifm-toc-border-color: var(--ifm-color-gray-200);
  --ifm-toc-link-color: var(--ifm-color-content-secondary);
  --ifm-toc-padding-vertical: 0.5rem;
  --ifm-toc-padding-horizontal: 0.5rem;
  --ifm-dropdown-background-color: var(--ifm-background-surface-color);
  --ifm-dropdown-font-weight: var(--ifm-font-weight-semibold);
  --ifm-dropdown-link-color: var(--ifm-font-color-base);
  --ifm-dropdown-hover-background-color: var(--ifm-hover-overlay);
  --ifm-footer-background-color: var(--ifm-color-gray-50);
  --ifm-footer-color: var(--ifm-color-gray-400);
  --ifm-footer-link-color: var(--ifm-color-emphasis-500);
  --ifm-footer-link-hover-color: var(--ifm-color-primary);
  --ifm-footer-link-horizontal-spacing: 0.5rem;
  --ifm-footer-padding-horizontal: calc(var(--ifm-spacing-horizontal) * 2);
  --ifm-footer-padding-vertical: calc(var(--ifm-spacing-vertical) * 2);
  --ifm-footer-title-color: inherit;
  --ifm-hero-background-color: var(--ifm-color-white);
  --ifm-hero-text-color: var(--ifm-color-black);
  --ifm-menu-color: var(--ifm-color-emphasis-700);
  --ifm-menu-color-active: var(--ifm-color-primary);
  --ifm-menu-color-background-active: var(--ifm-hover-overlay);
  --ifm-menu-color-background-hover: var(--ifm-hover-overlay);
  --ifm-menu-link-padding-horizontal: 1rem;
  --ifm-menu-link-padding-vertical: 0.375rem;
  --ifm-menu-link-sublist-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 24 24"><path fill="rgba(0,0,0,0.5)" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path></svg>');
  --ifm-menu-link-sublist-icon-filter: none;
  --ifm-navbar-background-color: var(--ifm-background-surface-color);
  --ifm-navbar-height: 3.75rem;
  --ifm-navbar-item-padding-horizontal: 1rem;
  --ifm-navbar-item-padding-vertical: 0.25rem;
  --ifm-navbar-link-color: var(--ifm-font-color-base);
  --ifm-navbar-link-hover-color: var(--ifm-color-primary);
  --ifm-navbar-link-active-color: var(--ifm-link-color);
  --ifm-navbar-padding-horizontal: var(--ifm-spacing-horizontal);
  --ifm-navbar-padding-vertical: calc(var(--ifm-spacing-vertical) * 0.5);
  --ifm-navbar-shadow: var(--ifm-global-shadow-lw);
  --ifm-navbar-search-input-background-color: var(--ifm-color-emphasis-200);
  --ifm-navbar-search-input-color: var(--ifm-color-emphasis-800);
  --ifm-navbar-search-input-placeholder-color: var(--ifm-color-emphasis-500);
  --ifm-navbar-search-input-icon: url('data:image/svg+xml;utf8,<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16px" width="16px"><path d="M6.02945,10.20327a4.17382,4.17382,0,1,1,4.17382-4.17382A4.15609,4.15609,0,0,1,6.02945,10.20327Zm9.69195,4.2199L10.8989,9.59979A5.88021,5.88021,0,0,0,12.058,6.02856,6.00467,6.00467,0,1,0,9.59979,10.8989l4.82338,4.82338a.89729.89729,0,0,0,1.29912,0,.89749.89749,0,0,0-.00087-1.29909Z" /></svg>');
  --ifm-navbar-sidebar-width: 80vw;
  --ifm-pagination-border-radius: calc(
    var(--ifm-global-radius) * var(--ifm-pagination-size-multiplier)
  );
  --ifm-pagination-color-active: var(--ifm-color-primary);
  --ifm-pagination-font-size: 1rem;
  --ifm-pagination-item-active-background: var(--ifm-hover-overlay);
  --ifm-pagination-page-spacing: 0.0625rem;
  --ifm-pagination-padding-horizontal: calc(var(--ifm-spacing-horizontal) * 1);
  --ifm-pagination-padding-vertical: calc(var(--ifm-spacing-vertical) * 0.25);
  --ifm-pagination-size-multiplier: 1;
  --ifm-pagination-nav-border-radius: var(--ifm-global-radius);
  --ifm-pagination-nav-color-hover: var(--ifm-color-primary);
  --ifm-pills-color-active: var(--ifm-color-primary);
  --ifm-pills-color-background-active: var(--ifm-hover-overlay);
  --ifm-pills-spacing: 0.0625rem;
  --ifm-tabs-color: var(--ifm-font-color-secondary);
  --ifm-tabs-color-active: var(--ifm-color-primary);
  --ifm-tabs-padding-horizontal: 1rem;
  --ifm-tabs-padding-vertical: 1rem;
  --ifm-tabs-spacing: 0.0625rem;
  --ifm-scrollbar-size: 7px;
  --ifm-scrollbar-track-background-color: #f1f1f1;
  --ifm-scrollbar-thumb-background-color: #888;
  --ifm-scrollbar-thumb-hover-background-color: #555;
}

/* https://codyhouse.co/blog/post/dark-light-switch-css-javascript */
html[data-theme="dark"] {
  --ifm-color-blue: #8be9fd;
  --ifm-color-white: #ffffff;
  --ifm-color-white-dark: #f0f0fd;
  --ifm-color-white-darker: #e6e6fd;
  --ifm-color-white-darkest: #c5c5e9;
  --ifm-color-pink: #ff79c6;
  --ifm-color-purple: #bd93f9;
  //--ifm-color-orange: #ffb86c;
  --ifm-color-orange: #fd971f;
  --ifm-color-orange-dark: #f25a00;
  --ifm-color-green: #49aa19;
  --ifm-color-red: #ff5555;
  //--ifm-color-red: rgb(255, 121, 198);
  --ifm-color-yellow: #f1fa8c;

  // ==============================================================================
  // Theme Colors
  // ==============================================================================

  // Primary
  // See 'General Docusaurs'
  --ifm-color-primary: var(--ifm-color-blue);
  --ifm-color-primary-dark: #64e2fc;
  --ifm-color-primary-darker: #51defc;
  --ifm-color-primary-darkest: #17d3fb;
  --ifm-color-primary-light: #b2f0fe;
  --ifm-color-primary-lighter: #c5f4fe;
  --ifm-color-primary-lightest: #ffffff;

  --ifm-color-secondary: #ff79c6;
  --ifm-color-secondary-dark: #ff53b6;
  --ifm-color-secondary-darker: #ff41ae;
  --ifm-color-secondary-darkest: #ff0896;
  --ifm-color-secondary-light: #ff9fd6;
  --ifm-color-secondary-lighter: #ffb1de;
  --ifm-color-secondary-lightest: #ffeaf6;

  --ifm-color-on-primary: var(--ifm-color-black);

  // Background
  --ifm-background-color: var(--ifm-color-gray-800);
  --ifm-background-surface-color: var(--ifm-color-gray-800);
  --ifm-color-background: var(--ifm-color-black-light);
  --ifm-color-background-2: var(--ifm-color-black-light);
  --ifm-color-background-3: var(--ifm-color-black-lighter);
  --ifm-color-on-background: var(--ifm-color-white);
  --ifm-color-on-background-2: var(--ifm-color-purple-lighter);
  --ifm-color-on-background-3: var(--ifm-color-purple-light);

  --ifm-footer-background-color: var(--ifm-color-gray-800);
  --ifm-footer-link-color: var(--ifm-color-gray-400);

  // Surface
  //--ifm-color-surface: var(--ifm-color-gray);
  --ifm-color-surface: red;
  --ifm-color-surface-transparent: rgba(
    38,
    38,
    48,
    0
  ); /* https://stackoverflow.com/questions/15597167/css3-opacity-gradient */
  --ifm-color-surface-2: var(--ifm-color-gray);
  --ifm-color-on-surface: var(--ifm-color-white);
  --ifm-color-on-surface-2: var(--ifm-color-purple-lightest);
  --ifm-color-on-surface-3: var(--ifm-color-purple-lighter);

  // Success
  --ifm-color-success: var(--ifm-color-green);
  --ifm-color-on-success: var(--ifm-color-black);

  --ifm-color-info: #28c6e4;

  // Error
  --ifm-color-error: var(--ifm-color-red);
  --ifm-color-on-error: var(--ifm-color-black);

  --ifm-admonition-background-color-error: var(--ifm-color-red);
  --ifm-admonition-color-error: var(--ifm-color-red);

  --ifm-code-background: var(--ifm-color-emphasis-300);

  [class="playgroundHeader__-node_modules-@docusaurus-theme-live-codeblock-src-theme-Playground-"] {
    background-color: var(--ifm-color-emphasis-400);
    color: white;
  }

  [class="playgroundPreview__-node_modules-\@docusaurus-theme-live-codeblock-src-theme-Playground-"] {
    border: 1px solid var(--ifm-color-emphasis-400);
  }

  .button--secondary {
    --ifm-button-border-color: var(--ifm-color-gray-200);
  }

  .button--secondary:not(.button--outline) {
    --ifm-button-background-color: var(--ifm-color-gray-200);
  }

  .button--secondary:not(.button--outline):hover {
    --ifm-button-background-color: var(--ifm-color-gray-300);
    --ifm-button-border-color: var(--ifm-color-gray-300);
  }

  /* Increase specificity. */

  .button--secondary:active,
  .button--secondary.button--active {
    --ifm-button-border-color: var(--ifm-color-gray-400);
    --ifm-button-background-color: var(--ifm-color-gray-400);

    background-color: var(
      --ifm-color-gray-400
    ); /* Has to be explicitly defined because .button--outline has quite high specificity. */
    border-color: var(
      --ifm-color-gray-400
    ); /* Has to be explicitly defined because .button--outline has quite high specificity. */
  }
}
